<!--<?php
require_once template('header'); 
print <<< EOT
<!--右边开始-->
<div id="right">
	<form name="mvmmall" action="" method="post" onsubmit = "return grade();">
	<input type="hidden" name="action" value="$action"/>
	<input type="hidden" name="uid" value="$group_id"/>
	<input type="hidden" name="setp" value="1"/>
	<table cellpadding="0" cellspacing="1" class="list1">
		<tr><th colspan="4"> $lang[add_rating]</th></tr>
		<tr >
			<td class="td_left">$lang[group_name]</td>
			<td width="35%"><input type="text" name="group_name" id="group_name" value="$group_name" size="23" maxlength="20" class="text" /></td>
			<td class="td_left">$lang[degree]</td>
			<td width="35%"><input type="text" name="degree" id="degree" value="$degree" size="23" maxlength="5" class="text" /></td>
		</tr>
		<tr >
			<td class="td_left">$lang[max_points]</td>
			<td><input type="text" name="max_points" id="max_points" value="$max_points" size="23" maxlength="20" class="text" /></td>
			<td class="td_left">$lang[min_points]</td>
			<td><input type="text" name="min_points" id="min_points" value="$min_points" size="23" maxlength="20" class="text" /></td>
		</tr>
		<tr >
		<td class="td_left">$lang[discount]</td>
		<td><input type="text" name="discount" value="$discount" size="4" maxlength="20" class="text" /> (%)</td>
		<td class="td_left">$lang[show_price]</td>
		<td><input type="radio" name="show_price" value="1" $show_price_y />$lang[show]　
		    <input type="radio" value="0" name="show_price" $show_price_n/>$lang[not_show]</td>
		</tr>
		<tr >
			<td class="td_left" valign="top">$lang[rating_list]
			  <input type="checkbox" name="chkall" id="chkall" value="check" onclick="checkall(this.form)">$lang[selectall]</td><td colspan="3">
				<table cellpadding="0" cellspacing="0" width="90%">
<!--
EOT;
foreach ($rank_list as $key=>$val){
$act_name = $key.'act[]';
 foreach ($rank as $key2=>$val2){
       $action = explode(':',$val2);
        if(in_array($key,$action)){
        $action_list[]=$key;
        if(in_array(1,$action) && in_array($key,$action))  $add_chk  ='checked';
        if(in_array(2,$action) && in_array($key,$action))  $edit_chk ='checked';
        if(in_array(3,$action) && in_array($key,$action))  $del_chk  ='checked';
        if(in_array(4,$action) && in_array($key,$action))  $see_chk  ='checked';
        if(in_array($key,$action))                         $rank_chk ='checked';
print <<<EOT
-->						
				      <tr>
						<td><input type="checkbox" value="$key" name="rank[]" $rank_chk/>$val</td>
						<td><input type="checkbox" value="1" name="$act_name" $add_chk/>$lang[input]</td>
						<td><input type="checkbox" value="2" name="$act_name" $edit_chk/>$lang[laws]</td>
						<td><input type="checkbox" value="3" name="$act_name" $del_chk/>$lang[remove]</td>
						<td><input type="checkbox" value="4" name="$act_name" $see_chk/>$lang[browse]</td>
					</tr>
<!--
EOT;
unset($add_chk,$edit_chk,$del_chk,$see_chk,$rank_chk);}}}print <<<EOT
-->	

<!--
EOT;
foreach ($rank_list as $key=>$val){
if(!in_array($key,$action_list)){
$act_name = $key.'act[]';
print <<<EOT
-->						
				      <tr>
						<td><input type="checkbox" value="$key" name="rank[]" $rank_chk/>$val</td>
						<td><input type="checkbox" value="1" name="$act_name" $add_chk/>$lang[input]</td>
						<td><input type="checkbox" value="2" name="$act_name" $edit_chk/>$lang[laws]</td>
						<td><input type="checkbox" value="3" name="$act_name" $del_chk/>$lang[remove]</td>
						<td><input type="checkbox" value="4" name="$act_name" $see_chk/>$lang[browse]</td>
					</tr>
<!--
EOT;
}}print <<<EOT
-->	

				</table>
			</td>
		</tr>
	</table>
	<div id="tfoot"><input type="submit" name="Submit" value="&nbsp;$lang[submit]&nbsp;" onclick="" /> <input type="reset" name="reset" value="&nbsp;$lang[reset]&nbsp;" /></div>
	</form>
</div>
<!-- end -->
<!--
EOT;
?>-->